<template>
	<view v-if="!isFirstload" class="container">
		<!-- 页面头部 -->
		<view class="main-header" :style="{paddingTop: platform == 'H5' ? '0' : '80rpx' }">
			<!-- <image class="bg-image" src="/static/background/user-header2.png" mode="scaleToFill"></image> -->
			<!-- 用户信息 -->
			<view v-if="isLogin" class="user-info">
				<view class="user-avatar">
					<avatar-image :url="userInfo.avatar_url" :width="100" />
				</view>
				<view class="user-content">
					<!-- 会员昵称 -->
					<view class="nick-name oneline-hide">{{ userInfo.nick_name }}</view>
					<!-- 会员等级 -->
					<view v-if="userInfo.grade_id > 0 && userInfo.grade" class="user-grade">
						<view class="user-grade_icon">
							<image class="image"
								src="">
							</image>
						</view>
						<view class="user-grade_name">
							<text>{{ userInfo.grade.name }}</text>
						</view>
					</view>
					<!-- 会员无等级时显示手机号 -->
					<view v-else class="mobile">{{ userInfo.mobile }}</view>
				</view>
			</view>
			<!-- 未登录 -->
			<view v-else class="user-info" @click="handleLogin">
				<view class="user-avatar">
					<avatar-image :width="100" />
				</view>
				<view class="user-content">
					<view class="nick-name">未登录</view>
					<view class="login-tips">点击登录账号</view>
				</view>
			</view>
		</view>
		<!-- 权益 -->
		<view class="equity flex flex-y-c flex-x-a">
			<view class="asset-left-item" @click="onTargetPoints">
				<view class="item-value dis-flex flex-x-center">
					<text>{{ isLogin ? userInfo.points : '--' }}</text>
				</view>
				<view class="item-name dis-flex flex-x-center">
					<text>{{ setting[SettingKeyEnum.POINTS.value].points_name }}</text>
				</view>
			</view>
			<view class="asset-left-item" @click="onEquityShow">
				<view class="item-value dis-flex flex-x-center">
					<text>{{ CardType }}</text>
				</view>
				<view class="item-name dis-flex flex-x-center">
					<text>会员权益</text>
				</view>
			</view>

		</view>
		<!-- 会员 -->
		<view class="my-member">
			<view class="flex flex-y-c flex-x-b">
				<view class="flex flex-y-c flex-x-b">
					<view class="my_m_i ">
						<img src="../../static/user/logo.png" alt="">

					</view>
					<view class="balance">
						存款余额: <span>{{userInfo.member.SaveMoney}}</span>
					</view>
				</view>
				<view class="btn">
					{{userInfo.member.CardTypeName?userInfo.member.CardTypeName:'普通会员'}}
				</view>
			</view>
		</view>
		<!-- 我的钱包 -->
		<!-- <view class="my-asset">
			<view class="asset-left flex-box dis-flex flex-x-around">
				<view class="asset-left-item" @click="onTargetWallet">
					<view class="item-value dis-flex flex-x-center">
						<text>{{ isLogin ? assets.balance : '--' }}</text>
					</view>
					<view class="item-name dis-flex flex-x-center">
						<text>账户余额</text>
					</view>
				</view>
				<view class="asset-left-item" @click="onTargetPoints">
					<view class="item-value dis-flex flex-x-center">
						<text>{{ isLogin ? assets.points : '--' }}</text>
					</view>
					<view class="item-name dis-flex flex-x-center">
						<text>{{ setting[SettingKeyEnum.POINTS.value].points_name }}</text>
					</view>
				</view>
				<view class="asset-left-item" @click="onTargetMyCoupon">
					<view class="item-value dis-flex flex-x-center">
						<text>{{ isLogin ? assets.coupon : '--' }}</text>
					</view>
					<view class="item-name dis-flex flex-x-center">
						<text>优惠券</text>
					</view>
				</view>
			</view>
			<view class="asset-right">
				<view class="asset-right-item" @click="onTargetWallet">
					<view class="item-icon dis-flex flex-x-center">
						<text class="iconfont icon-qianbao"></text>
					</view>
					<view class="item-name dis-flex flex-x-center">
						<text>我的钱包</text>
					</view>
				</view>
			</view>
		</view> -->

		<!-- 订单操作 -->
		<view class="order_n">
			<view class="service-title">我的订单</view>
			<view class="order-navbar">
				<view class="order-navbar-item" v-for="(item, index) in orderNavbar" :key="index"
					@click="onTargetOrder(item)">
					<view class="item-icon">
						<img :src="item.icon" mode=""></img>
						<!-- <text class="iconfont" :class="[`icon-${item.icon}`]"></text> -->
					</view>
					<view class="item-name">{{ item.name }}</view>
					<view class="item-badge" v-if="item.count && item.count > 0">
						<text v-if="item.count <= 99" class="text">{{ item.count }}</text>
						<text v-else class="text">99+</text>
					</view>
				</view>
			</view>
		</view>

		<!-- 我的服务 -->
		<view class="my-service">
			<!-- <view class="service-title">我的服务</view> -->
			<!-- <view class="service-content clearfix"> -->
			<block v-for="(item, index) in service" :key="index">
				<view v-if="item.type == 'link'" class="service-item" @click="handleService(item)">
					<view class="flex flex">
						<view class="item-icon">
							<img :src="item.icon" mode=""></img>
							<!-- <text class="iconfont" :class="[`icon-${item.icon}`]"></text> -->
						</view>
						<view class="item-name">{{ item.name }}</view>
					</view>
					<view class="item-badge" v-if="item.count && item.count > 0">
						<text v-if="item.count <= 99" class="text">{{ item.count }}</text>
						<text v-else class="text">99+</text>
					</view>
					<view class="">
						<image style="width: 30rpx;height: 36rpx;" src="../../static/right.png" mode=""></image>
					</view>
				</view>
				<view v-if="item.type == 'button' && platform == 'MP-WEIXIN'" class="service-item">
					<button class="btn-normal flex" @click="onToPhone">
						<view class="item-icon">
							<img :src="item.icon" mode=""></img>
						</view>
						<view class="item-name">{{ item.name }}</view>
					</button>
					
					<view class="">
						<image style="width: 30rpx;height: 36rpx;" src="../../static/right.png" mode=""></image>
					</view>
				</view>
			</block>
			<!-- </view> -->
		</view>
		<u-action-sheet :list="list" @click="click" v-model="showList"></u-action-sheet>
		<!-- 退出登录 -->
		<view v-if="isLogin" class="my-logout">
			<view class="logout-btn" @click="handleLogout()">
				<text>退出登录</text>
			</view>
		</view>

		<u-popup v-model="show" mode="center">
			<view class="swiper-3d">
				<swiper :current="swiper.current" class="s-container" @change="swiperChange" :circular="swiper.circular"
					:indicator-dots="swiper.indicatorDots" :interval="swiper.interval" :duration="swiper.duration"
					previous-margin="70px" next-margin='50px'>
					<swiper-item class="swiper-item" v-for="(item,index) in posters" :key="index">
						<view class="item-img" :class="swiper.current == index?'active':''">
							<view class="m_b flex flex-y-c">
								<image style="width: 48rpx;height: 48rpx;background: #F0BD0A;border-radius: 24rpx;"
									src="../../static/logo.png" mode=""></image>
								<view class="name">
									{{item.name}}
								</view>
							</view>
							<!-- <view class=" h"> -->
							<scroll-view scroll-y="true">
								<view class="h">
									<view class=" flex flex-y-c">
										<view class="b_r_3">
										</view>
										<view class="" style="font-weight: 550;">
											等级权益介绍
										</view>
									</view>
									<view class="quity" v-for="(i,j) in item.equity">
										{{i}}
									</view>
									<view class="flex flex-y-c">
										<view class="b_r_3">
										</view>
										<view class="" style="font-weight: 550;">
											权益对象
										</view>
									</view>
									<view class="quity">
										{{item.leave}}
									</view>
								</view>
							</scroll-view>

							<!-- </view> -->
						</view>
						<!-- <image class="item-img" :src="item" mode="aspectFit" :class="swiper.current == index?'active':''"></image> -->
					</swiper-item>
				</swiper>
				<!-- <view class="swiper-dot">
					<block v-for="(item,index) in posters" :key= "index">
						<view class="dot" :class="{'on':swiper.current == index}"></view>
					</block>
				</view> -->
			</view>
		</u-popup>

	</view>
</template>

<script>
	import store from '@/store'
	import AvatarImage from '@/components/avatar-image'
	import {
		setCartTabBadge
	} from '@/core/app'
	import SettingKeyEnum from '@/common/enum/setting/Key'
	import SettingModel from '@/common/model/Setting'
	import * as UserApi from '@/api/user'
	import * as OrderApi from '@/api/order'
	import {
		checkLogin
	} from '@/core/app'

	// 订单操作
	const orderNavbar = [{
			id: 'all',
			name: '全部订单',
			icon: '../../static/user/1.png'
		},
		{
			id: 'payment',
			name: '待支付',
			icon: '../../static/user/2.png',
			count: 0
		},
		{
			id: 'delivery',
			name: '待发货',
			icon: '../../static/user/3.png',
			count: 0
		},
		{
			id: 'received',
			name: '待收货',
			icon: '../../static/user/4.png',
			count: 0
		},
	]

	/**
	 * 我的服务
	 * id: 标识; name: 标题名称; icon: 图标; type 类型(link和button); url: 跳转的链接
	 */
	const service = [{
			id: 'coupon',
			name: '会员信息',
			icon: '../../static/user/21.png',
			type: 'link',
			url: 'pages/userInfo/index'
		}, 
		{
			id: 'myCoupon',
			name: '会员等级',
			icon: '../../static/user/23.png',
			type: 'link',
			url: 'pages/member/index'
		},{
			id: 'address',
			name: '收货地址',
			icon: '../../static/user/22.png',
			type: 'link',
			url: 'pages/address/index'
		},
		
		{
			id: 'contact',
			name: '在线客服',
			icon: '../../static/user/24.png',
			type: 'button',
			openType: 'contact'
		},
	]

	export default {
		components: {
			AvatarImage
		},
		data() {
			return {
				// 枚举类
				SettingKeyEnum,
				// 正在加载
				isLoading: true,
				// 首次加载
				isFirstload: true,
				// 是否已登录
				isLogin: false,
				// 系统设置
				setting: {},
				// 当前用户信息
				userInfo: {},
				// 账户资产
				assets: {
					balance: '--',
					points: '--',
					coupon: '--'
				},
				// 权益展示
				show: false,
				// 我的服务
				service,
				// 订单操作
				orderNavbar,
				// 当前用户待处理的订单数量
				todoCounts: {
					payment: 0,
					deliver: 0,
					received: 0
				},
				swiper: {
					current: 0,
					circular: false,
					indicatorDots: false,
					autoplay: true,
					interval: 3000,
					duration: 500,
				},
				CardType:'0',
				list: [{
					text: '0351-2347114',
				}],
				showList: false,
				posters: [{
						id: 1,
						name: '免费生日照',
						leave: '白金会员/黑金会员/钻石会员/至尊会员',
						equity: [
							'1、 在小马欢腾记录宝宝生日信息的会员， 可在生日前30天主动联系您的专属管家领取专属生日照拍摄一次；',
							'2、 未领取生日照特权的会员， 我们会在生日前1个月内向您致电或由专属管家联系您向您发放；',
							'3、 如您享受生日照特权时选择周一至周五拍摄， 可额外领取兑换生日专属摆台；',
							'4、 生日照特权每位会员每年最多可领取1次， 需您填写宝宝个人真实生日信息， 以免影响权益发放'
						]
					},
					{
						id: 2,
						name: '免费证件照',
						leave: '黑金会员/钻石会员/至尊会员',
						equity: [
							'1、当您的会员等级达到黑金会员及以上时，您可在小马欢腾指定1个门店内为宝宝拍摄证件照一套（仅享受电子版）；',
							'2、证件照特权每位会员每年最多可领取1次，建议您享受证件照拍摄权益时与您的套系选择同一档期拍摄，以免您到店排队等待。'
						]
					},
					{
						id: 3,
						name: '免费升级主题',
						leave: '黑金会员/钻石会员/至尊会员',
						equity: [
							'1、当您的会员等级达到黑金会员及以上时，您可在小马欢腾指定1个门店内任选主题，包括小马欢腾独家沉浸式主题及限量季节主题。（不含萌马庄园高端外景）',
							'2、您在享受升级主题特权时，建议您提前预约拍摄时间，我们将为您预留高端主题拍摄档期及影棚。'
						]
					},
					{
						id: 4,
						name: '加急修片特权',
						leave: '钻石会员/至尊会员',
						equity: [
							'1、当您的会员等级达到钻石会员及以上时，您在小马欢腾拍摄的正价套系每年可享受2次加急修片特权。',
							'2、每年可享受的加急修片特权，需要您在选片时告知我们选片老师。'
						]
					},
					{
						id: 5,
						name: '插队特权',
						leave: '钻石会员/至尊会员',
						equity: [
							'1、当您的会员等级达到钻石会员及以上时，如您想预约拍照服务，可拨打或企微联系您的专属管家预约时间，我们将优先为您安排；',
							'2、钻石会员及至尊会员推荐的新会员，同样享受插队特权。新会员可向您的管家提供您的推荐人进行特权认证。',
							'3、具体插队加急时间视不同门店、不同节假日及周末的繁忙程度，协商而定。'

						]
					},
					{
						id: 6,
						name: '总监拍摄',
						leave: '钻石会员/至尊会员',
						equity: ['1、钻石会员可享受小马欢腾指定1个门店的技术总监拍摄；',
							'2、为了您的拍摄体验，我们需要提前安排总监档期，需要您提前1个月进行预约。'
						]
					},
					{
						id: 7,
						name: '样片团队拍摄',
						leave: '钻石会员/至尊会员',
						equity: [
							'1、至尊会员可享受小马欢腾指定1个门店的样片团队拍摄；摄影老师指定为小马欢腾独家签约的全国摄影十佳获奖老师；',
							'2、为了您的拍摄体验，我们需要提前安排样片团队档期，需要您提前1个月进行预约。'
						]
					},
					{
						id: 8,
						name: '专属品牌服务',
						leave: '钻石会员/至尊会员',
						equity: [
							'1、小马欢腾独家合作异业商家达50余家，钻石会员及至尊会员可享受任意一家小马欢腾品牌合作方的会员服务及合作优惠。',
							'2、小马欢腾品牌合作方名录，您可查阅小马欢腾公众号或咨询您的专属管家。'
						]
					},
					{
						id: 9,
						name: '至尊卡',
						leave: '至尊会员',
						equity: ['至尊会员专享特权：每年您可引荐3位好友，1：1复制您的剩余套系中的任意套系内容，可指定小马欢腾任意门店进行拍摄。']
					}
				]
			}
		},

		/**
		 * 生命周期函数--监听页面显示
		 */
		onShow(options) {
			this.onRefreshPage()
		},

		methods: {
			onToPhone(){
				this.showList=true
			},
			click(){
				uni.makePhoneCall({
					phoneNumber: '0351-2347114', //电话号码
					success: function(e) {
						console.log(e);
					},
					fail: function(e) {
						console.log(e);
							
					},
				})
			},
			// 刷新页面
			onRefreshPage() {
				// 更新购物车角标
				setCartTabBadge()
				// 判断是否已登录
				this.isLogin = checkLogin()
				// 获取页面数据
				this.getPageData()
			},

			// 获取页面数据
			getPageData(callback) {
				const app = this
				app.isLoading = true
				Promise.all([app.getSetting(), app.getUserInfo(), app.getUserAssets(), app.getTodoCounts()])
					.then(result => {
						app.isFirstload = false
						// 初始化我的服务数据
						app.initService()
						// 初始化订单操作数据
						app.initOrderTabbar()
						// 执行回调函数
						callback && callback()
					})
					.catch(err => console.log('catch', err))
					.finally(() => app.isLoading = false)
			},

			// 初始化我的服务数据
			initService() {
				const app = this
				const newService = []
				service.forEach(item => {
					if (item.id === 'points') {
						item.name = '我的' + app.setting[SettingKeyEnum.POINTS.value].points_name
					}
					// 数据角标
					if (item.count != undefined) {
						item.count = app.todoCounts[item.id]
					}
					newService.push(item)
				})
				app.service = newService
			},

			// 初始化订单操作数据
			initOrderTabbar() {
				const app = this
				const newOrderNavbar = []
				orderNavbar.forEach(item => {
					if (item.count != undefined) {
						item.count = app.todoCounts[item.id]
					}
					newOrderNavbar.push(item)
				})
				app.orderNavbar = newOrderNavbar
			},

			// 获取商城设置
			getSetting() {
				const app = this
				return new Promise((resolve, reject) => {
					SettingModel.data()
						.then(setting => {
							app.setting = setting
							resolve(setting)
						}).catch(reject)
				})
			},

			// 获取当前用户信息
			getUserInfo() {
				const app = this
				return new Promise((resolve, reject) => {
					!app.isLogin ? resolve(null) : UserApi.info({}, {
							load: app.isFirstload
						})
						.then(result => {
							app.userInfo = result.data.userInfo
							console.log(app.userInfo.member,111)
							if(app.userInfo.member!=undefined){
								if(app.userInfo.member.CardTypeName=='白金会员'){
									app.CardType= 1
								}else if(app.userInfo.member.CardTypeName=='黑金会员'){
									app.CardType= 3
								}else if(app.userInfo.member.CardTypeName=='钻石会员'){
									app.CardType= 7
								}else if(app.userInfo.member.CardTypeName=='至尊会员'){
									app.CardType=8
								}else if(app.userInfo.member.CardTypeName==undefined||''){
									app.CardType=0
								}
							}
							
							
							resolve(app.userInfo)
						})
						.catch(err => {
							if (err.result && err.result.status == 401) {
								app.isLogin = false
								resolve(null)
							} else {
								reject(err)
							}
						})
				})
			},

			// 获取账户资产
			getUserAssets() {
				const app = this
				return new Promise((resolve, reject) => {
					!app.isLogin ? resolve(null) : UserApi.assets({}, {
							load: app.isFirstload
						})
						.then(result => {
							app.assets = result.data.assets
							resolve(app.assets)
						})
						.catch(err => {
							if (err.result && err.result.status == 401) {
								app.isLogin = false
								resolve(null)
							} else {
								reject(err)
							}
						})
				})
			},

			// 获取当前用户待处理的订单数量
			getTodoCounts() {
				const app = this
				return new Promise((resolve, reject) => {
					!app.isLogin ? resolve(null) : OrderApi.todoCounts({}, {
							load: app.isFirstload
						})
						.then(result => {
							app.todoCounts = result.data.counts
							resolve(app.todoCounts)
						})
						.catch(err => {
							if (err.result && err.result.status == 401) {
								app.isLogin = false
								resolve(null)
							} else {
								reject(err)
							}
						})
				})
			},

			// 跳转到登录页
			handleLogin() {
				// uni.navigateTo({
				// 	url:'/pages/login/login'
				// })
				!this.isLogin && this.$navTo('pages/login/login')
			},

			// 退出登录
			handleLogout() {
				const app = this
				uni.showModal({
					title: '友情提示',
					content: '您确定要退出登录吗?',
					success(res) {
						if (res.confirm) {
							store.dispatch('Logout', {})
								.then(result => app.onRefreshPage())
						}
					}
				})
			},

			// 跳转到钱包页面
			onTargetWallet() {
				this.$navTo('pages/wallet/index')
			},

			// 跳转到订单页
			onTargetOrder(item) {
				this.$navTo('pages/order/index', {
					dataType: item.id
				})
			},

			// 跳转到我的积分页面
			onTargetPoints() {
				this.$navTo('pages/points/log')

			},

			// 跳转到我的优惠券页
			onTargetMyCoupon() {
				this.$navTo('pages/my-coupon/index')
			},

			// 跳转到服务页面
			handleService({
				url
			}) {
				this.$navTo(url)
			},

			swiperChange(e) {
				this.swiper.current = e.detail.current;
			},

			// 权益显示
			onEquityShow() {
				this.show = true
			}

		},

		/**
		 * 下拉刷新
		 */
		onPullDownRefresh() {
			// 获取首页数据
			this.getPageData(() => {
				uni.stopPullDownRefresh()
			})
		},


	}
</script>

<style lang="scss" scoped>
	.flex {
		display: flex;
	}

	.flex-y-c {
		align-items: center;
	}

	.flex-x-b {
		justify-content: space-between;
	}

	.flex-x-a {
		justify-content: space-around;
	}

	.equity {
		margin-top: -216rpx;
		position: relative;
		margin-bottom: 30rpx;
	}

	.my-member {
		width: 700rpx;
		height: 171rpx;
		background: #424041;
		border-radius: 20rpx;
		margin: 0 auto;
		position: relative;
		// margin-top: -100rpx;
		padding: 20rpx 30rpx 0 30rpx;

		.my_m_i {
			width: 77rpx;
			height: 77rpx;
			background: rgba(255, 207, 44, 0.1);
			border-radius: 50%;

			img {
				width: 100%;
				height: 100%;
			}

		}

		.balance {
			font-size: 24rpx;
			font-family: Source Han Sans CN;
			font-weight: 500;
			color: #FFD84A;
			margin-left: 30rpx;

			span {
				font-size: 42rpx;
			}
		}

		.btn {
			width: 160rpx;
			height: 49rpx;
			background: linear-gradient(94deg, #FEE0AD 0%, #FED289 100%);
			border-radius: 20rpx;
			text-align: center;
			font-size: 26rpx;
			font-family: Source Han Sans CN;
			font-weight: 500;
			color: #B96C2D;
			line-height: 49rpx;
		}
	}

	// 页面头部
	.main-header {
		background-color: #FFD84A;
		// background-image: url('/static/background/user-header.png');
		position: relative;
		width: 100%;
		height: 540rpx;
		background-size: 100% 100%;
		overflow: hidden;
		display: flex;
		align-items: center;
		// padding-top: 40rpx;
		padding-left: 30rpx;
		border-radius: 0rpx 0rpx 50rpx 50rpx;
		position: relative;

		.bg-image {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
			z-index: 0;
		}

		.user-info {
			display: flex;
			height: 100rpx;
			z-index: 1;
			margin-top: -180rpx;

			.user-content {
				display: flex;
				flex-direction: column;
				justify-content: center;
				margin-left: 30rpx;
				color: #c59a46;

				.nick-name {
					font-size: 34rpx;
					font-weight: bold;
					max-width: 270rpx;
				}

				.mobile {
					margin-top: 15rpx;
					font-size: 28rpx;
				}

				.user-grade {
					align-self: baseline;
					display: flex;
					align-items: center;
					background: #3c3c3c;
					margin-top: 12rpx;
					border-radius: 10rpx;
					padding: 4rpx 12rpx;

					.user-grade_icon .image {
						display: block;
						width: 32rpx;
						height: 32rpx;
					}

					.user-grade_name {
						margin-left: 5rpx;
						font-size: 26rpx;
						color: #EEE0C3;
					}

				}

				.login-tips {
					margin-top: 12rpx;
					font-size: 30rpx;
				}

			}
		}
	}

	// 角标组件
	.item-badge {
		position: absolute;
		top: 0;
		right: 55rpx;
		background: #fa2209;
		color: #fff;
		border-radius: 100%;
		min-width: 38rpx;
		height: 38rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		padding: 1rpx;
		font-size: 24rpx;
	}

	// 我的钱包
	.my-asset {
		display: flex;
		padding: 40rpx 0;
		position: absolute;
		bottom: 800rpx;
		left: 26rpx;

		.asset-right {
			width: 200rpx;
			border-left: 1rpx solid #eee;
		}

		.asset-right-item {
			text-align: center;
			color: #545454;

			.item-icon {
				font-size: 44rpx;
			}

			.item-name {
				margin-top: 14rpx;
				font-size: 28rpx;
			}

		}

		.asset-left-item {
			text-align: center;
			color: #666;
			padding: 0 42rpx;

			.item-value {
				font-size: 34rpx;
				color: red;
			}

			.item-name {
				margin-top: 6rpx;
			}

			.item-name {
				margin-top: 14rpx;
				font-size: 28rpx;
			}
		}

	}

	// 订单操作
	.order_n {
		margin: 20rpx auto 20rpx auto;
		padding: 20rpx 0;
		width: 94%;
		box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
		font-size: 30rpx;
		border-radius: 20rpx;
		background: #fff;
		margin-top: -58rpx;
		position: relative;

		.service-title {
			padding-left: 24rpx;
			margin-bottom: 20rpx;
			font-size: 30rpx;
			color: #231816;
		}

		.order-navbar {
			display: flex;


			&-item {
				position: relative;
				width: 25%;

				.item-icon {
					text-align: center;
					margin: 0 auto;
					width: 36rpx;
					height: 44rpx;
					color: #545454;
					font-size: 44rpx;

					img {
						width: 100%;
						height: 100%;
					}
				}

				.item-name {
					font-size: 28rpx;
					color: #545454;
					text-align: center;
					margin-right: 10rpx;
					margin-top: 20rpx;
				}

			}
		}
	}

	// 我的服务
	.my-service {
		margin: 22rpx auto 22rpx auto;
		padding: 22rpx 24rpx;
		width: 94%;
		box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
		border-radius: 20rpx;
		background: #fff;

		.service-title {
			padding-left: 24rpx;
			margin-bottom: 20rpx;
			font-size: 30rpx;
		}

		.service-item {
			position: relative;
			margin-bottom: 50rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			height: 60rpx;
			.flex {
				display: flex;
				justify-content: space-between;
				// align-items: center;
			}

			.item-icon {
				text-align: center;
				margin: 0 auto;
				width: 41rpx;
				height: 37rpx;
				color: #545454;
				font-size: 44rpx;
				margin-right: 30rpx;

				img {
					width: 100%;
					height: 100%;
				}
			}

			.item-name {
				font-size: 28rpx;
				color: #545454;
				text-align: center;
				margin-right: 10rpx;
				margin-top: 8rpx;
			}

		}

	}

	// 退出登录
	.my-logout {
		display: flex;
		justify-content: center;
		margin-top: 50rpx;

		.logout-btn {
			width: 60%;
			margin: 0 auto;
			font-size: 28rpx;
			color: #616161;
			border-radius: 20rpx;
			border: 1px solid #dcdcdc;
			padding: 16rpx 0;
			text-align: center;
		}
	}

	// swiper
	.swiper-3d {
		padding: 0upx 20upx;
		width: 750rpx;
		height: 800rpx;

		.s-container {
			height: 800upx;
			width: 105%;

			.swiper-item {
				// max-width: 630upx;
				height: 90%;
				padding: 0upx 20upx;
				box-sizing: border-box;
				position: relative;


			}

			.item-img {
				// position: absolute;
				margin-top: 50upx;
				width: 100%;
				height: 80%;
				border-radius: 15upx;
				z-index: 5;
				background-color: #fff;
				padding: 25rpx 21rpx;
				// opacity: 0.7;
				// top: 7%;
				// transform: translateY(-50%);
				// box-shadow:0px 4upx 15upx 0px rgba(153,153,153,0.24);

				.b_r_3 {
					width: 20rpx;
					height: 20rpx;
					border: 3rpx solid #F8BA33;
					border-radius: 50%;
					margin-right: 17rpx;
				}

				.h {
					height: 550rpx;
					.quity{
						font-size: 26rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #666666;
						margin: 15rpx 0 ;
						letter-spacing: 2rpx;
					}
				}

				.m_b {
					margin-bottom: 40rpx;

					.name {
						font-size: 38rpx;
						font-family: PingFang SC;
						font-weight: bold;
						color: #282828;
						margin-left: 20rpx;
					}
				}
			}

			.active {
				opacity: 1;
				z-index: 10;
				height: 90%;
				top: -3%;
				transition: all .1s ease-in 0s;
				transform: translateY(0);
			}
		}

		.swiper-dot {
			display: flex;
			justify-content: center;
			align-items: center;

			// padding-top: 10upx;
			.dot {
				margin: 0 10upx;
				width: 15upx;
				height: 15upx;
				border-radius: 50%;
				background: #bbb;

				&.on {
					background: #F4BD48;
				}
			}
		}
	}
</style>
